-
Notifications
You must be signed in to change notification settings - Fork 274
Updates posix_memalign to consider malloc may fail #5512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates posix_memalign to consider malloc may fail #5512
Conversation
Signed-off-by: Felipe R. Monteiro <[email protected]>
Signed-off-by: Felipe R. Monteiro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; thanks.
Codecov Report
@@ Coverage Diff @@
## develop #5512 +/- ##
========================================
Coverage 68.34% 68.34%
========================================
Files 1187 1187
Lines 98090 98090
========================================
Hits 67044 67044
Misses 31046 31046
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me, just don't quite understand the changes to one of these tests.
@@ -1,8 +1,8 @@ | |||
CORE | |||
main.c | |||
--pointer-check --bounds-check | |||
--pointer-check --bounds-check --malloc-may-fail --malloc-fail-null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't completely understand the changes for this test. You are changing the flags but not the expected output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the flags, so now the test considers malloc can fail. However, this doesn't change the expected output of this test, since it's resilient to a failed malloc. @hannes-steffenhagen-diffblue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feliperodri I'd recommend to reverse the changes here. Tests should be self contained and not contain flags that aren’t relevant for the test. This test is unrelated to --malloc-may-fail
and hence shouldn’t use the flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hannes-steffenhagen-diffblue I'll send a new PR that update these flags. I'll keep the failed regression test with the malloc flags and I'll remove them from the this test case.
Could I get one more review @tautschnig @kroening @chrisr-diffblue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible, thanks!
Signed-off-by: Felipe R. Monteiro [email protected]